<div>
    <div class="modal-body" th:object="${labRegistration}">
        <input type="hidden" name="labRegistrationId" th:value="*{labRegistrationId}">
        <div class="form-group row">
            <label for="useTime" class="col-form-label col-sm-3">使用时间:</label>
            <input type="text" class="form-control col-sm-8" id="useTime" name="useTime" th:value="*{#strings.substring(useTime,0,2)}+'月'+*{#strings.substring(useTime,2,4)}+'日'+*{#strings.substring(useTime,4,8)}+'节'" required>
        </div>
        <div class="form-group row">
            <label for="className" class="col-form-label col-sm-3">班级名称:</label>
            <input type="text" class="form-control col-sm-8" id="className" name="className"  th:value="*{classInfo}!=null?*{classInfo.className}:''" required>

        </div>

        <div class="form-group row">
            <label for="classroomName" class="col-form-label col-sm-3">教室名称:</label>
            <input type="text" class="form-control col-sm-8" id="classroomName" name="classroomName" th:value="*{classroomInfo}!=null?*{classroomInfo.classroomName}:''" required>
        </div>
        <div class="form-row">
            <div class="form-group row col-sm-6">
                <label for="teacherName" class="col-form-label col-sm-6">教师名称:</label>
                <input type="text" class="form-control col-sm-5" id="teacherName"  th:value="*{teacherInfo}!=null?*{teacherInfo.teacherName}:''" readonly>
            </div>
            <div class="form-group row col-sm-6">
                <label for="teacherNumber" class="col-form-label col-sm-4 ">工号:</label>
                <input type="text" class="form-control col-sm-8" id="teacherNumber" name="teacherNumber"  th:value="*{teacherInfo}!=null?*{teacherInfo.teacherNumber}:''" onkeyup="this.value=this.value.replace(/[^\0-9\.]/g,'');" placeholder="请输入教师工号"  required>
            </div>
        </div>
        <div class="form-row">
            <div class="form-group row col-sm-6">
                <label for="actual" class="col-form-label col-sm-6">应到人数:</label>
                <input type="text" class="form-control col-sm-4" id="actual"  th:value="*{classInfo.classSize}" readonly>
            </div>
            <div class="form-group row col-sm-6">
                <label for="attendance" class="col-form-label col-sm-6 ">实到人数:</label>
                <input type="text" class="form-control col-sm-4" id="attendance" name="attendance"  th:value="*{attendance}" required>
            </div>
        </div>
        <div class="form-group row">
            <label for="situation" class="col-form-label col-sm-3">设备状况:</label>
            <select  class="form-control col-sm-8 form-control-chosen" id="situation" name="situation" data-placeholder="请选择" required>
                <option value="0" data-th-selected="${#strings.contains(labRegistration.situation,'0')}">故障</option>
                <option value="1" data-th-selected="${#strings.contains(labRegistration.situation,'1')}">正常</option>
            </select>
        </div>

        <div class="form-group row">
            <label for="abnormalRepair" class="col-form-label">维修状况:</label>
            <textarea class="form-control" id="abnormalRepair" name="abnormalRepair"  rows="3" style="resize: none">[[*{abnormalRepair}]]</textarea>
        </div>
        <div class="form-group row">
            <label for="labRegistrationComment" class="col-form-label">备注:</label>
            <textarea class="form-control" id="labRegistrationComment" name="labRegistrationComment"  rows="3" style="resize: none">[[*{labRegistrationComment}]]</textarea>
        </div>

    </div>
    <div class="modal-footer">
        <input class="btn btn-primary" type="submit" value="提交">
        <button type="button" class="btn btn-secondary" data-dismiss="modal" id="labRegistrationDialogClose">Close</button>
    </div>
</div>